package hibernate_advanced_apply.object_inherit_mapping.alltable.annotation.source;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * @author Administrator
 * @create 2019-01-28 11:41
 * @desc:子类2
 **/
@Entity
@Table(name="son2")
@PrimaryKeyJoinColumn(name="ID")
public class Son2 extends Father{

    @Column(name="sex")
    private String sex;

    @Column(name ="name")
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
